#include<iostream>
using namespace std;
const int N = 1e5 + 10;
int n, m;
int p[N];
int main()
{
	while (cin >> n >> m) {
		if (!n && !m) {
			break;
		}
		for (int i = 1; i <= n; i++) {
			p[i] = i;
		}
		for (int i = 0; i < n - 1; i++) {
			int a, b;
			cin >> a >> b;
			p[b] = a;
		}
		while (m--) {
			int a, b;
			cin >> a >> b;
			int ans1 = 0;
			int ans2 = 0;
			while (a != p[a]) {
				ans1++;
				a = p[a];
			}
			while (b != p[b]) {
				ans2++;
				b = p[b];
			}
			if (ans1 > ans2) {
				cout << "pfz" << endl;
			}
			else {
				cout << "lxh" << endl;
			}
		}
	}
	return 0;
}